package searcher;

/**
 * A data object describing the position in a file at which a text match was
 * found
 * 
 * @version $Id: TextMatch.java,v 1.1 2006/02/22 15:00:06 abutler Exp $
 */
public class TextMatch
{
	private final int theLineNumber;

	private final int theCharNumber;

	/**
	 * Creates a TextMatch
	 * 
	 * @param lineNo The line on which the match occurred
	 * @param charNo The character index in the line on which the position
	 *        occurred
	 */
	public TextMatch(int lineNo, int charNo)
	{
		theLineNumber = lineNo;
		theCharNumber = charNo;
	}

	/**
	 * @return The line on which the match occurred
	 */
	public int getLineNumber()
	{
		return theLineNumber;
	}

	/**
	 * @return The character index in the line on which the position occurred
	 */
	public int getCharNumber()
	{
		return theCharNumber;
	}
}
